import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App";
import store from "./store";
import { Provider } from "react-redux";

import { createBrowserRouter, RouterProvider, Link } from "react-router-dom";

const router = createBrowserRouter([
  {
    path: "/login",
    element: (
      <div>
        我是登陆界面
        <hr />
        <Link to="/article">文章页面</Link>
      </div>
    ),
  },
  {
    path: "/article/:id",
    element: <div>我是文章面</div>,
  },
]);

const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
  // <Provider store={store}>
  //   <App />
  // </Provider>
  <RouterProvider router={router} />
);
